<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 转换字符 toString(),String(),+
        var age = 18;
        console.log(typeof(age));
        console.log(typeof(age.toString()));
        console.log(typeof(String(age)));
        console.log(typeof('' + age));
        // 转number parseInt(),parseFloat(),Number(),-*/
        var name = '999';
        console.log(typeof(parseInt(name)));
        console.log(typeof(parseFloat(name)));
        console.log(typeof(Number(name)));
        console.log(typeof(name - 2));
        
    </script>
</head>
<body>
    
</body>
</html>